#ifndef Alphabet_H
#define Alphabet_H
#include<vector>
#include"HashMap.h"
#include<string>
#include"ObjectWriter.h"
#include"ObjectReader.h"
#include<iostream>
using namespace std;

class Alphabet{
private:
	HashMap Map;
	int numEntries;
	bool growthStopped;

	// Serialization
	static const long serialVersionUID = 1;
	static const int CURRENT_SERIAL_VERSION = 0;

public:
	Alphabet();
	Alphabet(int capacity);
	~Alphabet();
	int lookupIndex(string* entry, bool &flag);
	vector<string*>* toArray();
	bool contains(string* entry);
	int size();
	void stopGrowth();
	void allowGrowth();
	bool growthStop();
	void writeObject(ObjectWriter &out);
	void readObject(ObjectReader &in);
	void display();
};
#endif
